package org.example.com.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 帖子评论实体类
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class PostComment implements Serializable {
    private static final long serialVersionUID = 1L;

    private Integer id;
    private Integer postId;
    private Integer userId;
    private String userName;
    private String userAvatar;
    private String content;
    private Integer parentId; // 父评论ID（用于回复）
    private String status; // active-正常，deleted-已删除
    
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdAt;
    
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updatedAt;
    
    // 关联数据（不存储到数据库）
    private List<PostComment> replies; // 回复列表
}
